let chrSys = new Chrs.t_chrSys

let build new_dir =
	chrSys#build_automaton (Automaton.int_to_label new_dir)

let update new_dir =
	chrSys#update (Automaton.int_to_label new_dir)

let ch_mode mode =
	if (mode = 1) then
	   chrSys#begin_acquire

let end_acquire i = if (i = 0) then chrSys#end_acquire else -1

let get_chrSys i = chrSys 

let _ =
	Callback.register "get_chrSys" get_chrSys;
	Callback.register "build" build;
	Callback.register "update" update;
	Callback.register "ch_mode" ch_mode;
	Callback.register "end_acquire" end_acquire;
	Callback.register "to_string" chrSys#to_string;
	Callback.register "get_string" chrSys#get_string_id
